<?php

class Application_Model_DbTable_VisiteurRow extends Zend_Db_Table_Row_Abstract {

    public function getLanguesParlee() {
        return $this->findManyToManyRowset('Application_Model_DbTable_langue', 'Application_Model_DbTable_visiteurLangue');
    }

    public function getLanguesParleeString() {
        $chaine = '';
        $this->findManyToManyRowset('Application_Model_DbTable_langue', 'Application_Model_DbTable_visiteurLangue')->toArray();
        foreach ($this->findManyToManyRowset('Application_Model_DbTable_langue', 'Application_Model_DbTable_visiteurLangue')->toArray() as $langue) {
            $chaine.=' '.$langue['nom'];
        }
        return $chaine;
    }

    public function getNbLanguesParlee() {
        return $this->findManyToManyRowset('Application_Model_DbTable_langue', 'Application_Model_DbTable_visiteurLangue')->count();
    }

}
